/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package util;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 *
 * @author gabrielbmoro
 */
public class Criptografia {
    public static String md5(String senha) throws NoSuchAlgorithmException{
        MessageDigest md = MessageDigest.getInstance("MD5");
        md.update(senha.getBytes());
        BigInteger hash = new BigInteger(1, md.digest());
        return hash.toString(16);
}
}
